package com.bdrm.mapper;

import com.bdrm.dto.OrderPageQueryDTO;
import com.bdrm.entity.OrderDetail;
import com.bdrm.entity.Orders;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface OrderDetailMapper {
    void insertBatch(List<OrderDetail> orderDetails);

    // 根据订单id查询订单详情
    @Select("select * from order_detail where order_id = #{orderId}")
    List<OrderDetail> getByOrderId(Long orderId);

    Page<Orders> pageQuery(OrderPageQueryDTO orderPageQueryDTO);
}
